import request from '@/utils/request'

// 添加巡检计划
export const addPlan = (data) => {
  return request({
    method: 'post',
    url: '/inspection/plan/add',
    data,
  })
}

// 查询巡检计划列表
export const getPlanList = (params) => {
  return request({
    method: 'get',
    url: '/inspection/plan/query',
    params,
  })
}

// 获取巡检计划详情
export const getPlanDetail = (params) => {
  return request({
    method: 'get',
    url: '/inspection/plan/get',
    params,
  })
}

// 修改巡检计划
export const updatePlan = (data) => {
  return request({
    method: 'put',
    url: `/inspection/plan/update/${data.pkid}`,
    data,
  })
}

// 删除巡检计划
export const deletePlan = (params) => {
  return request({
    method: 'delete',
    url: `/inspection/plan/delete`,
    params,
  })
}
